package com.jet.market.gate;

import com.jet.core.result.ResultJson;
import com.jet.market.service.MarketRechargeRuleService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/gate/market/recharge-rule")
public class GateMarketRechargeRuleController {

    @Resource
    private MarketRechargeRuleService marketRechargeRuleService;

    @GetMapping("/list")
    public ResultJson list(@RequestHeader long merchantNo,
                           @RequestHeader long storeNo,
                           @RequestHeader String accountId) {
        return ResultJson.ok(marketRechargeRuleService.findAll(merchantNo, storeNo, accountId));
    }
}